from django import template
register = template.Library()

@register.filter
def divide(value, arg):
    try:
      print(value, arg)
      return int(value) / int(arg)
    except (ValueError, ZeroDivisionError) as e:
      print(str(e))
      return None
